Optimal. Leaf size=97 \[ \frac {(A-i B) (a+i a \tan (c+d x))^n \, _2F_1\left (1,n;n+1;\frac {1}{2} (i \tan (c+d x)+1)\right )}{2 d n}-\frac {A (a+i a \tan (c+d x))^n \, _2F_1(1,n;n+1;i \tan (c+d x)+1)}{d n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 97, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {3600, 3481, 68, 3599, 65} \[ \frac {(A-i B) (a+i a \tan (c+d x))^n \, _2F_1\left (1,n;n+1;\frac {1}{2} (i \tan (c+d x)+1)\right )}{2 d n}-\frac {A (a+i a \tan (c+d x))^n \, _2F_1(1,n;n+1;i \tan (c+d x)+1)}{d n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 68
Rule 3481
Rule 3599
Rule 3600
Rubi steps
\begin {align*} \int \cot (c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx &=\frac {A \int \cot (c+d x) (a-i a \tan (c+d x)) (a+i a \tan (c+d x))^n \, dx}{a}+(i A+B) \int (a+i a \tan (c+d x))^n \, dx\\ &=\frac {(a A) \operatorname {Subst}\left (\int \frac {(a+i a x)^{-1+n}}{x} \, dx,x,\tan (c+d x)\right )}{d}+\frac {(a (A-i B)) \operatorname {Subst}\left (\int \frac {(a+x)^{-1+n}}{a-x} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=\frac {(A-i B) \, _2F_1\left (1,n;1+n;\frac {1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^n}{2 d n}-\frac {A \, _2F_1(1,n;1+n;1+i \tan (c+d x)) (a+i a \tan (c+d x))^n}{d n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 25.06, size = 0, normalized size = 0.00 \[ \int \cot (c+d x) (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.99, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left ({\left (i \, A + B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + i \, A - B\right )} \left (\frac {2 \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{n}}{e^{\left (2 i \, d x + 2 i \, c\right )} - 1}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 4.42, size = 0, normalized size = 0.00 \[ \int \cot \left (d x +c \right ) \left (a +i a \tan \left (d x +c \right )\right )^{n} \left (A +B \tan \left (d x +c \right )\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (B \tan \left (d x + c\right ) + A\right )} {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \mathrm {cot}\left (c+d\,x\right )\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^n \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{n} \left (A + B \tan {\left (c + d x \right )}\right ) \cot {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________